package com.pro01.tracker.mapper;

import com.pro01.tracker.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    @Select("SELECT id FROM users WHERE passkey = #{passkey} LIMIT 1")
    Long getUserIdByPasskey(String passkey);

    // 可选：如果后续需要获取整个用户对象
    @Select("SELECT * FROM users WHERE passkey = #{passkey} LIMIT 1")
    User getUserByPasskey(String passkey);
}

